/**
 * @author lk
 * @date 2022/6/1 15:49
 */
package com.mmall.spring5;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class God {

    @Autowired
    @Qualifier("myUser")
    private User user;

    @Resource
    private Main main;

    @Override
    public String toString() {
        return "God{" +
                "user=" + user +
                ", main=" + main +
                '}';
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }
}
